@extends('layouts.default')
@section('title', $title)
@section('content')
    <div class="offset-md-2 col-md-8">
        <h2 class="mb-4 text-center">{{ $title }}</h2>
        <div class="list-group list-group-flush">
            @foreach ($users as $user)
                <div class="list-group-item">
                    <img class="me-3" src="{{ $user->avatar }}" alt="{{ $user->name }}" width=32>
                    <a class="text-decoration-none" href="{{ route('user.show', $user) }}">
                        {{ $user->name }}
                    </a>
                    <span>&nbsp;email:{{$user->email}}</span>
                    <span>&nbsp;创建时间:{{$user->created_at->diffForHumans()}}</span>
                </div>

            @endforeach
        </div>

        <div class="mt-3 d-flex justify-content-end">
            {!! $users->render() !!}
        </div>
    </div>
@stop
